#include<iostream>
#include<string>
using namespace std;

string* copyStr(string&tgt) {
  return *tgt; // Operator * is not overloaded.
}
int main(int argc, char**argv) {
  string *str;
  string *sp=new string{"hello"};
  cout << *sp << endl; // This works.
  str=new string{"Helloworld"}; // Do not use * at the wrong place.
  cout << *str << endl;
  delete str;
  str=copyStr(*sp);
  cout << str << endl;
}
